home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / byte0787.arc / IWPAS.ARC / DECLARES.P < prev    next >
Encoding:
Text File  |  1987-04-28  |  3.4 KB  |  107 lines

  1. { DECLARES.P -- declarations for picture handlers       }
  2.  
  3. { Copyright (c) 1987, Ciarcia's Circuit Cellar          }
  4. {    All Rights Reserved                                }
  5.  
  6. {-------------------------------------------------------}
  7. { Global constants                                      }
  8.  
  9. CONST
  10.  
  11. {--- defaults for serial port setup                     }
  12.  
  13.  bitsec    = 28800;             { default serial speed  }
  14.  COMport   = $3F8;              { 3F8 = COM1            }
  15.                                 { 2F8 = COM2            }
  16.  
  17. {--- resolution control bytes to receiver & transmitter }
  18.  
  19.  fullres   = $80;               { set high resolution   }
  20.  halfres   = $81;               { set high resolution   }
  21.  quartres  = $82;               { set high resolution   }
  22.  
  23. {--- control bytes from transmitter                     }
  24.  
  25.  fieldsync = $40;               { new field!            }
  26.  linesync  = $41;               { new line              }
  27.  fldend    = $42;               { end of field          }
  28.  rep1      = $80;               { repeat x1             }
  29.  rep16     = $90;               { repeat x16            }
  30.  
  31. {--- image structure                                    }
  32.  
  33.  maxbit    = $3F;               { bits used in pel      }
  34.  maxpel    = 255;               { highest pel index     }
  35.  maxline   = 243;               { highest line index    }
  36.  maxbuffer = 32766;             { highest "INT" index   }
  37.  
  38. {-------------------------------------------------------}
  39. { Global types                                          }
  40.  
  41. TYPE
  42.  
  43.  bitrng    = 0..maxbit;         { bit range             }
  44.  pelrng    = 0..maxpel;         { pel indexes           }
  45.  linerng   = 0..maxline;        { line indexes          }
  46.  subrng    = 0..maxbuffer;      { raw data indexes      }
  47.  
  48.  pelrec    = RECORD             { one scan line         }
  49.            syncL : BYTE;
  50.            pels  : ARRAY[pelrng] OF BYTE;
  51.            END;
  52.  
  53.  linerec   = RECORD             { complete binary field }
  54.            syncF : BYTE;
  55.            lines : ARRAY[linerng] OF pelrec;
  56.            syncE : BYTE;
  57.            END;
  58.  
  59.  rawrec    = ARRAY[subrng] OF INTEGER;
  60.  
  61.  picptr    = ^pictype;                 { picture ptr    }
  62.  pictype   = RECORD CASE INTEGER OF    { picture formats}
  63.            0 : (fmt : linerec);
  64.            1 : (words : rawrec);
  65.            1 : (bytes : BYTE);         { dummy          }
  66.            END;
  67.  
  68.  histtype  = ARRAY[bitrng] OF REAL;    { pel histograms }
  69.  
  70.  regrec = RECORD CASE INTEGER OF
  71.           1 : (AX : INTEGER;
  72.                BX : INTEGER;
  73.                CX : INTEGER;
  74.                DX : INTEGER;
  75.                BP : INTEGER;
  76.                SI : INTEGER;
  77.                DI : INTEGER;
  78.                DS : INTEGER;
  79.                ES : INTEGER;
  80.                FLAGS : INTEGER);
  81.           2 : (AL,AH : BYTE;
  82.                BL,BH : BYTE;
  83.                CL,CH : BYTE;
  84.                DL,DH : BYTE);
  85.          END;
  86.  
  87.  byteptr   = ^BYTE;                    { general ptr    }
  88.  strtype   = STRING[255];              { strings        }
  89.  
  90.  
  91. {-------------------------------------------------------}
  92. { Global variables                                      }
  93.  
  94. VAR
  95.  
  96.  picfile   : FILE OF pictype;
  97.  pic0      : picptr;
  98.  pic1      : picptr;
  99.  pic2      : picptr;
  100.  pic3      : picptr;
  101.  histo     : histtype;
  102.  
  103.  IOerror   : BYTE;
  104.  filespec  : strtype;
  105.  filespec2 : strtype;
  106.  
  107.